<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>编辑数据</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light">
<div class="container mt-5" style="max-width: 500px;">
    <h3 class="mb-4">编辑数据</h3>
    <form method="post">
        {% csrf_token %}
        <div class="mb-3">
            <label class="form-label">标题</label>
            <input type="text" name="title" value="{{ record.title }}" class="form-control" required>
        </div>
        <div class="mb-3">
            <label class="form-label">内容</label>
            <textarea name="content" class="form-control" rows="5" required>{{ record.content }}</textarea>
        </div>
        <button type="submit" class="btn btn-primary w-100">保存修改</button>
    </form>
    <a href="{% url 'data_list' %}" class="btn btn-secondary mt-3 w-100">返回</a>
</div>
</body>
</html>
